package com.wanglin.myapplication.slice;

import com.wanglin.myapplication.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;

public class MainAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);

        initComponents();
    }

    private void initComponents() {
        Button btn_next= (Button) findComponentById(ResourceTable.Id_button_next);

        btn_next.setClickedListener(listener->present(new SecondAbilitySlice(),new Intent()));
    }


    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
